﻿<%@page contentType="text/vnd.wap.wml; charset=utf-8"%>
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%>
<%@ page import="common.*"%> 
<%@ page import="wapbean.*"%>
<%@ page import="org.slf4j.LoggerFactory" %> 
<%@ page import="org.slf4j.Logger" %> 

<?xml version="1.0" encoding="utf-8"?>   
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org//DTD//wml_1.1.xml">   
<wml>
<%     // String Pro=(String)session.getAttribute("ProviderID");  
       // System.out.println("ProProProPro="+Pro); 
       	Logger logger = LoggerFactory.getLogger("index");
       	// 获取手机号
		String mobile = request.getHeader("x-up-calling-line-id");
		// 获取UA
		String userAgent = request.getHeader("User-Agent");
		//记录统计日志
		logger.info(request.getRemoteHost() + "|" + request.getRequestURI()+"?"+request.getQueryString() + "|" + mobile + "|" + userAgent);
		
        String name=(String)session.getAttribute("name"); 
        String Byname=(String)session.getAttribute("Byname");  
    	String purl = (String) session.getAttribute("p");
        ContentFactory Fac= new ContentFactory();
//        WapcategoryFactory Fac1 = new WapcategoryFactory();  
//        SecondUrl second=new SecondUrl();
        Vector vc = Fac.getMobilemodelBean();      
      boolean find = false;
       String MobileName=null;
	if (vc != null && !vc.isEmpty()) {
		int n = vc.size();
	//	System.out.println("nnnnnn=" + n);
		//循环获取url
		//String prid=null;
		for (int j = 1; j < n; j++) {
			MobilemodelBean ab = (MobilemodelBean) vc.elementAt(j);
			String description = ab.getDescription();
			  MobileName=ab.getMobileName();
			//prid = ab.getProviderID();
			
			String[] p = description.split(";");
		//	System.out.println("pppppp=" + p);
			int k;
			//判断当前机型是否包含访问中带的机型----------------begin
				for ( k = 0; k < p.length; k++) { 
					if (purl.equals(p[k])) { 
						find = true;
		    	//System.out.println("获取到url=" + purl);
					  break;   
					}
				}
			//判断当前机型是否包含访问中带的机型----------------end
			if(find){
				break;  
			}

	   }
	   // System.out.println("MobileName=" + MobileName); 
	   //for 循环结束
	   
	   //-------------------------------begin
	   				
			//判断当前url是否与访问url相等----------------begin
			//判断是否获取到对应url--------------begin 
			if(!find){//没找到
			//如果没有找到对应机型，但是url又不为空，则跳转到雅维28
				  purl="qxm787";    
		         
			//	 System.out.println("pgggggggggggggggggggggggggggggggggggg=" + find);
			//	  System.out.println("pgggggggggggggggggggggggggggggggggggg=" + purl);
			}else{//找到了对应的机型，如果没有内容，则跳转到维护页面
				if(vc == null || vc.isEmpty()){
		    //  System.out.println("ggggg=" + find);   
				%>
	    		 <jsp:forward page="wappages/anc.jsp"></jsp:forward>
	    		<% 
	    		 }else{
	    		//	  System.out.println("ffffffffffff=" + find); 
	    			  System.out.println("game3.0=" + purl);    
	    		 }  
			}
		}
	   //----------------------------------end    
	             NewFactory newF= new NewFactory();  
	             MobilemodelBean Mobilemodel = newF.getmobilemodelDescription(purl);   
	    	      String  MobileModelID=Mobilemodel.getMobileModelID();
	    	      String  ProviderID=Mobilemodel.getProviderID();
	    	 //     System.out.println("mobileModelid=" + MobileModelID);
	    	 //     System.out.println("providerid=" + ProviderID);
	    	       Vector newvc = newF.getWapcategory(MobileModelID);
	    	       WapcategoryFactory Fac1 = new WapcategoryFactory();
	    	       
	%> 
<!--<card id="card1" title="乐游-<%//=pb.getName()%>专区">            -->
<card id="card1" title="乐游网">            
<p align="left">

 <img src="/game3.0/img/logo.png" alt=""/><br/>
<!--<a href="http://wap.leyoou.cn/game3.0/StoryServlet1?CategoryID=67&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>"> 圈子：编织炫.丽生活</a><br/>-->
<%@ include file="includes/video_top.jsp"%><!-- 精彩视频 -->
<%@ include file="includes/book.jsp" %><!-- 精彩图书 -->
<%@ include file="includes/shop_navi.jsp" %><!--商城 -->
<%@ include file="includes/shop_hot.jsp" %><!--商城 -->
<!--<a href="/game3.0/ShiPinServlet?purl=<%=purl%>">更多视频搜索</a><br/> -->
<!--<a href="/game3.0/StoryServlet?CategoryID=70&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>">中国移动G客G拍</a><br/> -->
<!--<a href="http://wap.leyoou.cn/game3.0/wappages/hjpc.jsp?purl=<%=purl%>">幻姬内测评测</a><br/>  
<a href="http://wap.leyoou.cn/game3.0/wappages/hjgc.jsp?purl=<%=purl%>">幻姬开始盛大公测</a><br/> -->                
<!--<a href="http://wap.leyoou.cn/game3.0/StoryServlet?CategoryID=69&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>">龙英雄</a><br/>      -->
	
<%@ include file="includes/video_bottom.jsp" %>   	
	leyoou.cn 京ICP备09030014号   <a href="http://www.waptn.com/v.php?id=8851"><img alt="waptn" border="0" src="http://m.waptn.com/tn.php?id=8851&amp;a=<%=(request.getRequestURL()+"?"+request.getQueryString()).replaceAll("&","%636")%>&amp;r=<%=(request.getHeader("Referer")+"").replaceAll("&","%636")%>" /></a>

	</p>
</card>
</wml>